< previous page page_40 next page >

Page 40
The primary data object used in Visual Basic programs is the Recordset object. This is the object that holds the collection of data records used in your Visual Basic programs. There are three different types of Recordset objects. They are
· Dynaset-type Recordset object
· Table-type Recordset object
· Snapshot-type Recordset object
Any one of these Recordset objects can be used to gain access to an existing data table in a database. However, they each have unique properties and behave differently at times. Today you learn how these three types of Recordset data objects differ and when it is best to use these objects in your programs.
Note.gif
In previous versions of Visual Basic, the Recordset object types were available as unique data objects (Dynaset, Table, and Snapshot). These objects can still be used when working with the older (version 2.5) data access object model, but it is not recommended. All data access object models now support the Recordset object types and that is the object you should use in all new Visual Basic programs.

You also learn about another data object today: the Database object. You can use the Database object to get information about the connected database. In this lesson, you learn about the general properties and behaviors of the Database object of the data control and how you can use them in your programs.
Note.gif
You learn more about the Database object in Day 9 "Visual Basic and the Microsoft Jet Engine."

Dataset-Oriented Versus Data Record-Oriented
Before you learn about Visual Basic data objects, you should first learn some basics of how Visual Basic operates on databases in general. When you understand how Visual Basic looks at databases, you can better create programs that meet your needs.

 
< previous page page_40 next page >

If you like this book, buy it!